package com.taotao.quartz;

import java.util.Date;

import javax.annotation.Resource;

import com.taotao.common.TaotaoConstant;
import com.taotao.pojo.UserInfo;
import com.taotao.service.UserInfoService;

/**
 * 每5秒往数据库插一条数据
 * @author zhangxiangwei
 *
 */
public class QuartzController {
	
	@Resource
	private UserInfoService userInfoService;

	public void execute(){
		UserInfo userInfo = new UserInfo();
		userInfo.setName("zhangsan");
		userInfo.setAge(30);
		userInfo.setSex(1);
		userInfo.setBirthday(new Date());
		userInfo.setCreateDateTime(new Date());
		userInfo.setDeleteFlag(TaotaoConstant.DELETE_FLAG.yes_flag);
		userInfoService.add(userInfo);
	}
}
